<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        /* .div1 {
            width: 300px;
            height: 200px;
            background-color: red;
        } */

        div[title*="2属性"] {
            width: 300px;
            height: 200px;
            background-color: red;
        }
    </style>
</head>
<body>

    <div title="属性demo1" class="div1">div1</div>
    <div title="demo2属性" class="div1">div2</div>
    <div title="属性demo3" class="div3">div3</div>
    <div title="my2属性demo4" class="div3">div4</div>

    <p title="my-p-demo4">pppppp</p>
    
</body>
</html>